package uk.ac.aber.Blockmation.Actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import uk.ac.aber.Blockmation.DrawingPad;
import uk.ac.aber.Blockmation.MainFrame;


/**
 * 
 * @author tom
 */

public class ActionOvalTool extends AbstractAction {
	
    private MainFrame mainFrame;
    private String path = "../icons/ChangeShapeOval.gif";

    public ActionOvalTool(MainFrame mainFrame) {
        //super("Oval"); 
        this.mainFrame = mainFrame;
        
        // the below from settings class file or?!
        //putValue(SHORT_DESCRIPTION, tooltip);  // Will appear as tooltip text.
        //putValue(MNEMONIC_KEY, new Integer(mnemonic));
        
    }
        
    public void actionPerformed(ActionEvent e) {

    	mainFrame.getPad().setTool(DrawingPad.OVAL);
    	
    }
    
    public void setImage () {
        CreateImageIcon createImageIcon = new CreateImageIcon();
        putValue(SMALL_ICON, createImageIcon.create(path));
    }

}
